<?php
define('APPTYPEID', 0);
define('CURSCRIPT', 'member_online');

require './source/class/class_core.php';

$discuz = & discuz_core::instance();

$modarray = array('index');

$mod = !in_array($discuz->var['mod'], $modarray) ? 'index' : $discuz->var['mod'];

define('CURMODULE', $mod);

$discuz->init();


$page = empty($_GET['page'])?1:intval($_GET['page']);
if($page<1) $page=1;
$perpage = 50;
$start = ($page-1)*$perpage;
$limit = $start + $perpage;
$query = DB::query("SELECT * FROM ".DB::table('common_who_online')." ORDER BY dateline DESC LIMIT $start, $perpage");
$count = getcount('common_who_online');
$members = array();
while ($member = DB::fetch($query)){
	$members[] = $member;
}

$multi = multi($count, $perpage, $page, "online.php?");
include template('member/who_online');
?>